RgnMaster is absolutely “gratis”. Feel free to distribute RgnMaster to anyone you want. However, I would appreciate it if you would send me any routines and techniques you want to get off your chest (anything to do with games in particular, especially animation, would be greeted with kneeling and bowing and a few "I’m not worthy!" chants from the author). Correspondence is always welcomed from any and all.
* Distribution Method:
As mentioned previously, distribute RgnMaster to anyone you want. However, you must include all of the bundled files that came with RgnMaster. This means including the source code along with the RgnMaster application!
• Requirements
---------------------------------------------
RgnMaster requires System 7.x or later to run. However, if you really want System 6.0.x compatibility (come on! get with the program!) then you can modify the source code, but don’t distribute your modifications without my permission first.
Only one little change required: the program uses System 7-specific FSSpec’s and StandardFileReply’s when saving a region to a file; you can change this to your older System 6.0.x SFReply.
Note: RgnMaster uses _BitMapToRegion() to do the actual region creation; I’m not sure, but this trap may not be available prior to System 7. If this is so, then you’re out of luck (that or create your own picture-to-region conversion routine).
• What Is It? What Does It Do?
---------------------------------------------
* Why:
Good question. From my experience, regions are usually created and used on-the-fly. For most purposes this is fine. However, there may be times when you need a lot of regions, and creating them on the fly may be too burdensome. The answer: create them first and save them as resources, and then use them as you would use any other resource. Most applications will never have to do this, but games in particular may need a region-creation utility. I noticed there is no standard way when it comes to handling regions as resources, and there wasn’t any region utilities that catered to my specific needs. So RgnMaster was born.
* How:
To create a region, first make a mask that the region will be based on. This is a picture (your standard "PICT"), preferably black and white. The areas in black in your mask picture will be parts of the region. Color pictures are OK, but they’re converted to black and white before conversion anyway.
After creating your mask picture, copy it to the clipboard. Then launch RgnMaster or switch to it if you’re already running it. Then click on “Convert & Replace” or “Convert Only”.
“Convert & Replace” converts the picture on the clipboard to a region, and puts the region back onto the clipboard. Whatever picture was on the clipboard previously is replaced. Now you can switch to ResEdit or the like and paste the region into anything you desire. “Convert Only” does just that; it doesn’t place the region on the clipboard, but keeps the region private to itself. You would use this if you want to place the region into RgnMaster or another file without pasting it in manually (via ResEdit).
* Some Notes:
You can view your copied picture that's on the clipboard. Select Edit->Show Clipboard. Click anywhere (or press any key) to make it go away.
After conversion, you can view your region. Click on the “View Region...” button; the region is filled in black. Click anywhere to make the preview go away.
By default, regions are of resource type "Rgn " (note the extra space at the end). You can change this either by selecting File->Options... or clicking on the Options... button. Or you can change the resource type upon saving the region to RgnMaster or to another file. When saving, you will be prompted for the region resource type and region name; the resource type that you specify applies to that region only—you're not changing the default region resource type. Note that resource types must be exactly four letters/characters long.
* Automatic Region Offsetting to 0, 0:
If your mask picture isn’t flushed top and left (i.e. the actual image is not touching the left and/or top side), then the region won’t be flushed topleft either. Most of the times this isn’t what you want—at least it’s not what I want—so RgnMaster automatically offsets the region so that its topleft corner will be at 0, 0. If you don’t want RgnMaster to offset the region automagically for you, keep down the option key when "Convert & Replacing" or "Converting Only". I would have put this in as a checkbox option, but I ran out of screen space!!
Yep that’s it. RgnMaster is pretty simple and single-minded in its purpose and goal: picture to region conversion. I hope you find this utility and/or the source code useful. And if you find any of the above text confusing, sorry. But just experiment with the program-it’s pretty simple and you can’t do any wrong. Live long and prosper.
• Yeah, it's me mouthing off again
---------------------------------------------
This section is reserved for my peanut gallery comments. I suggest you don’t read this stuff if your time is precious. Otherwise if you're just vegging around, read on. All of the below are of my own opinions and are not representative of programmers, UCLA students, crazed psychotics, or Macintosh game designers. The usual disclaimer stuff.
First, something about me (just in case you're wondering what kind of guy writes stuff like this). I’m currently enrolled at UCLA as an undergraduate and I’ll be graduating in about a year. I’m majoring in Psychobiology, which it turns out, can be quite interesting. Programming is a hobby that I do to pass the time—otherwise I have no life. Don’t ask me what I plan to do after graduation. I’ve been trying to decide these past four years! However, if you’re looking for a guy who loves to design games and who’s willing to learn and self-teach himself any language or skill necessary to help design games, drop me a line!! Or if you’re looking for a graduate student in behavioral neuropsychology or physiological psychology with extensive experience in Macintosh programming, feel free to call too! Alright, enough self-plug!
Yanni Plug: I’ve recently discovered Yanni and I love it! I never thought I would be a Yanni fan, but watching Yanni Live At The Acropolis on PBS made me an instant convert. Get your copy of Yanni today! Great new age music.
I first got into programming after my brother bought a Mac SE in ’86. Boy, that seems just like yesterday. Anyway, I first dabbled in HyperCard and HyperTalk, moved onto Pascal for a few years, and then graduated to C++. Most of my experience was self-taught; the latter C++ years I took courses here at UCLA in programming. I currently use a Mac IIsi to do my Macintosh black magic...
What I do is write games. My first completed project was Concentroids 1.0, released June 1993. Mainly your concentrations/memory game taken to the extreme, with animation, sound, and music. About 1.1 MB in size, I believe. It was programmed in Think Pascal, but due to a freak of nature (and my stupidity) the source code is forever lost. I’m working on Concentroids 2.0, which will blow the prior version out of the water. Probably available by Summer '94. Write to me if you’re interested in my games.
---------------------------------------------
Anyway, if you have any rebukes or comments I would love to hear from you. You can reach me at America Online at StarLabs (that or old-fashioned snail mail).